Number Field Component
1. Introduction
The Number Field component is a specialized input field designed to accept numeric values. It is highly customizable and supports various configurations, such as labels, help messages, and validation. This component is essential for collecting numerical data, such as quantities, prices, or measurements, in a structured and user-friendly way.
Purpose and Use Cases
- Purpose: The Number Field component is used to collect numeric input from users in a controlled and validated manner.
- Primary Use Cases:
- Collecting quantities, prices, or measurements in forms.
- Enabling users to input numeric data for calculations or analysis.
- Providing a user-friendly interface for entering numbers with validation.
Benefits
- Customizable: Fully configurable properties, styles, and validation options.
- Interactive: Supports tooltips, help messages, and dynamic behaviors.
- Improved UX: Ensures accurate numeric input with validation and feedback.
- Cross-Platform Compatibility: Works seamlessly on desktop, tablet, and mobile devices.
2. Properties
The Number Field component comes with several configurable properties to suit different use cases. Below is a detailed breakdown:
Code
- Description: A unique identifier for the component.
- Purpose: Used to reference the component programmatically.
- Required/Optional: Required
Label
- Description: The text label displayed above or beside the number field.
- Purpose: Provides context for the user about the purpose of the number field.
- Required/Optional: Optional
Answer
- Description: The numeric value entered by the user in the number field.
- Purpose: Captures the user's input for processing or storage.
- Sub-Property:
- Reset Button: Resets the number field to blank.
- Required/Optional: Optional
Mandatory Field
- Description: Specifies whether the number field is required.
- Purpose: Ensures that users provide input before proceeding.
- Default: OFF
- Required/Optional: Optional
Help
- Description: Displays a help message for the number field.
- Purpose: Provides additional guidance or context for the user.
- Default: OFF
- Sub-Property:
- Help Message: A textbox to input the help text.
- Required/Optional: Optional
Enabled
- Description: Determines whether the number field is active or disabled.
- Purpose: Controls the availability of the number field to users.
- Default: ON
- Required/Optional: Optional
3. Style
The Number Field component offers extensive styling options to ensure it aligns with the application's design. Below are the key styling properties:
Size and Position
- Reset: Resets size and position settings to default.
- Size:
- Width & Height: Define the number field's dimensions.
- Min Size: Minimum width and height (default: none).
- Max Size: Maximum width and height (default: none).
- Position:
- Alignment: Left, right, top, bottom (default: left, top).
- X Position: Horizontal offset from the edge.
- Y Position: Vertical offset from the edge.
- Z-Index: Specifies the stack order of the number field (default: 0).
- Fixed Position: Locks the number field's position on the screen (default: OFF).
- Hidden: Hides the number field from view (default: OFF).